﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SMTC.Dao.Role;
using SMTC.Model.Model;
using SMTC.BO.Common;
using SMTC.Model.TestCore;
using System.Data.Common;
using IMPlant.Core.Data.Unity;

namespace SMTC.BO.Role
{
  public  class RoleQueryService
    {
      private RoleQueryDao _dao = new RoleQueryDao();
      /// <summary>
      /// 获取所有角色
      /// </summary>
      /// <param name="RoleName"></param>
      /// <returns></returns>
        public List<SMT_RoleModel> GetRoleList(string RoleName)
        {
            RoleName = DbValueProccess.StrProccess(RoleName);

            return _dao.GetRoleList(RoleName) ;
        }
      /// <summary>
      /// 根据ROLEID获取成员
      /// </summary>
      /// <param name="RoleID"></param>
      /// <returns></returns>
        public List<EmpInfo> GetMemberInRoleList(string RoleID)
        {
            return _dao.GetMemberInRoleList(RoleID);
        }
        public bool CheckMemberInRole(SMT_MemberInRole_Model model)
        {
           return _dao.CheckMemberInRole(model);

        }
        public List<SMT_FunctionModel> GetFunctionList()
        {
            return _dao.GetFunctionList();
        }
        public List<SMT_RoleFunctionModel> GetRoleFunctionList(string RoleID)
        {
            return _dao.GetRoleFunctionList(RoleID);
        }
        public List<SMT_RoleModel> GetRoleByRoleID(string RoleID)
        {
            return _dao.GetRoleByRoleID(RoleID);
        }
       
    }
}
